/* Points to table of defined typefaces. */
struct face *x_face_table[MAX_FACES_AND_GLYPHS];
\f
+/* Error if we are not connected to X. */
+static void
+check_x ()
+{
+ if (x_current_display == 0)
+ error ("X windows are not in use or not initialized");
+}
+
/* Return the Emacs frame-object corresponding to an X window.
It could be the frame's main window or an icon window. */
{
struct window *w = XWINDOW (window);
- w->top += n;
+ XFASTINT (w->top) += n;
if (!NILP (w->vchild))
- x_set_menu_bar_lines_1 (w->vchild);
+ x_set_menu_bar_lines_1 (w->vchild, n);
if (!NILP (w->hchild))
- x_set_menu_bar_lines_1 (w->hchild);
+ x_set_menu_bar_lines_1 (w->hchild, n);
}
}
char *name_key;
char *class_key;
+ check_x ();
+
CHECK_STRING (attribute, 0);
CHECK_STRING (class, 0);
unsigned int width, height;
Lisp_Object values[4];
+ check_x ();
CHECK_STRING (string, 0);
geometry = XParseGeometry ((char *) XSTRING (string)->data,
long window_prompting = 0;
int width, height;
- if (x_current_display == 0)
- error ("X windows are not in use or not initialized");
+ check_x ();
name = x_get_arg (parms, Qname, "title", "Title", string);
if (XTYPE (name) != Lisp_String
{
Color foo;
+ check_x ();
CHECK_STRING (color, 0);
if (defined_color (XSTRING (color)->data, &foo))
"Return t if the X screen currently in use supports color.")
()
{
+ check_x ();
+
if (x_screen_planes <= 2)
return Qnil;
Lisp_Object frame;
{
Display *dpy = x_current_display;
+ check_x ();
return make_number (DisplayWidth (dpy, DefaultScreen (dpy)));
}
Lisp_Object frame;
{
Display *dpy = x_current_display;
+ check_x ();
return make_number (DisplayHeight (dpy, DefaultScreen (dpy)));
}
Lisp_Object frame;
{
Display *dpy = x_current_display;
+ check_x ();
return make_number (DisplayPlanes (dpy, DefaultScreen (dpy)));
}
Lisp_Object frame;
{
Display *dpy = x_current_display;
+ check_x ();
return make_number (DisplayCells (dpy, DefaultScreen (dpy)));
}
{
Display *dpy = x_current_display;
char *vendor;
+ check_x ();
vendor = ServerVendor (dpy);
if (! vendor) vendor = "";
return build_string (vendor);
Lisp_Object frame;
{
Display *dpy = x_current_display;
+
+ check_x ();
return Fcons (make_number (ProtocolVersion (dpy)),
Fcons (make_number (ProtocolRevision (dpy)),
Fcons (make_number (VendorRelease (dpy)), Qnil)));
(frame)
Lisp_Object frame;
{
+ check_x ();
return make_number (ScreenCount (x_current_display));
}
(frame)
Lisp_Object frame;
{
+ check_x ();
return make_number (HeightMMOfScreen (x_screen));
}
(frame)
Lisp_Object frame;
{
+ check_x ();
return make_number (WidthMMOfScreen (x_screen));
}
(frame)
Lisp_Object frame;
{
+ check_x ();
+
switch (DoesBackingStore (x_screen))
{
case Always:
(screen)
Lisp_Object screen;
{
+ check_x ();
+
switch (screen_visual->class)
{
case StaticGray: return (intern ("static-gray"));
(frame)
Lisp_Object frame;
{
+ check_x ();
+
if (DoesSaveUnders (x_screen) == True)
return Qt;
else
register KeySym keysym;
KeySym modifier_list[16];
+ check_x ();
CHECK_STRING (x_keysym, 1);
CHECK_STRING (newstring, 3);
int strsize;
register unsigned i;
+ check_x ();
CHECK_NUMBER (keycode, 1);
CHECK_CONS (strings, 2);
rawkey = (KeySym) ((unsigned) (XINT (keycode))) & 255;
(on)
Lisp_Object on;
{
+ check_x ();
+
XSynchronize (x_current_display, !EQ (on, Qnil));
return Qnil;